#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
int main()
{
	string str1, str2;
	cin >> str1 >> str2;
	for (auto& x : str1)
	{
		if (x >= 'a' && x <= 'z')
			x -= 32;

	}
	for (auto& x : str2)
	{
		if (x >= 'a' && x <= 'z')
			x -= 32;

	}
	if (str1 < str2)
	{
		cout << -1;
	}
	else if (str1 == str2)
	{
		cout << 0;
	}
	else cout << -1;
	return 0;
}